﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="QuanLySanPham.aspx.cs" Inherits="WebApplication1.Admin.QuanLySanPham" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<script src="../Scripts/javascript.js" type="text/javascript"></script>  
<div style="width:790px; padding:0px 0 0 5px;">
<div class="ct_top">
<div class="ct_left"></div>
<div class="ct_right"></div>
<div class="ct_center"><h1>quản lý sản phẩm</h1></div>
</div> 

 <div class="ct_middle">
     
    <div style=" text-align:left; padding:10px 0 10px 40px ">
    <a href=ThemSanPham.aspx>Thêm sản phẩm mới</a>
        </div>
                <div style=" text-align:left; padding-left:40px;">
            <asp:Label ID="LabelThongbao" runat="server" ForeColor="Red" Text=""></asp:Label>
        </div>
        <div style="padding:5px 0 15px 0;">
        <asp:GridView ID="GridView1" runat="server" CellPadding="4" Width="770px" 
        AutoGenerateColumns="False" 
        AllowPaging="True" 
        onpageindexchanging="GridView1_PageIndexChanging" 
                onrowcommand="GridView1_RowCommand" ForeColor="#333333" GridLines="None">
            <RowStyle BackColor="#EFF3FB" />
            <Columns>
<%--             <asp:TemplateField>
            <HeaderTemplate>
            <asp:CheckBox ID="chkHead" runat="server"
            onclick="changeCheckState()" />
            </HeaderTemplate>
            <ItemTemplate>
            <asp:CheckBox ID="chkCheckItem" runat="server" />
            </ItemTemplate>
            </asp:TemplateField>--%>
                <asp:BoundField DataField="Idsp" HeaderText="Mã sản phẩm" />
                <asp:BoundField DataField="Tensp" HeaderText="Tên sản phẩm" />
                <asp:BoundField DataField="Tenloai" HeaderText="Tên loại" />
                <asp:BoundField DataField="Kieudang" HeaderText="Kiểu dáng" />
                <asp:BoundField DataField="Chatlieu" HeaderText="Chất liệu" />
                <asp:BoundField DataField="Kichco" HeaderText="Kích cỡ" />
                <asp:BoundField DataField="Mau" HeaderText="Màu" />
                <asp:BoundField DataField="Xuatxu" HeaderText="Xuất xứ" />
                <asp:BoundField DataField="Dongia" HeaderText="Đơn giá" />
                <asp:TemplateField HeaderText="Hình">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Hinh") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Image ID="Image1" Width="60px" runat="server" ImageUrl='<%# Eval("Hinh") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                
             <asp:TemplateField HeaderText="Quản lý">
                  <ItemTemplate>
                  <div style="float:left;">
                     <asp:LinkButton ForeColor="#000066" ID="lbtsua" runat="server" CausesValidation="False" CommandName="update" CommandArgument=<%#Eval("Idsp") %> Text="Sửa" />
                    </div>
                    
                    <div style="float:right; padding-left:5px;">
                     <asp:LinkButton ForeColor="#000066" ID="lbtxoa" runat="server" CausesValidation="False" CommandName="deleterow" CommandArgument=<%#Eval("Idsp") %>
                    OnClientClick="return DeleteConfirmation();" Text="Xóa" />
                    </div>
                    
                  </ItemTemplate>
            </asp:TemplateField>
            
            
            </Columns>
            <FooterStyle BackColor="#507CD1" ForeColor="White" Font-Bold="True" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
     </div>
      </div>
<div class="ct_bottom">
<div class="ct_left"></div>
<div class="ct_right"></div>
<div class="ct_center"></div>
</div>
 </div>
</asp:Content>
